/**
 * ship-device edit
 */
let _this;
let _loading;
layui.use(['form', 'tableSelect', 'layedit', 'laydate'], function () {
    let form,layer,tableSelect,layedit,laydate,$;
    form = layui.form,
        layer = layui.layer,
        tableSelect = layui.tableSelect,
        layedit = layui.layedit,
        laydate = layui.laydate,
        $ = layui.$;

    let u = localStorage.getItem("ADMIN_LOGIN");
    let loginU = {};
    if (u == undefined) {
        layer.msg('请登录', {icon: 1, time: 500}, function () {
            window.location = 'page/login.html';
        });
    } else {
        loginU = decryptLocalStorage(u);
    }
    let _data = localStorage.getItem("productData");
    let viewData = undefined;
    let shipId = "";

    if (_data != undefined) {
        viewData = decryptLocalStorage(_data, loginU.token);
        $("#shipIds").val(viewData.shipIds);
        $("#shipNames").val(viewData.shipNames);
        $("#productName").val(viewData.productName);
        $("#productQuantity").val(viewData.productQuantity);
        $("#productPrice").val(viewData.productPrice);
        $("#sellFlag").val(viewData.sellFlag);
        $("#productDescribe").val(viewData.productDescribe);
        $("#remark").val(viewData.remark);
        form.render('select');
    }

});
